%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\providecommand\forslides{0}
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\ifnum\forslides=1

\documentclass{beamer}

\else

\documentclass[11pt,a4paper,twoside]{article}
\usepackage{beamerarticle}
\renewcommand{\lecture}[1]{\chapter{#1}}
\renewcommand{\frametitle}[1]{\marginpar{\raggedright #1}}
\renewcommand{\familydefault}{\sfdefault}
\usepackage[a4paper,margin=30mm]{geometry}
\fi

\input{beamer-template}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\usepackage{acadyear}
\AcademicYearStart{19/09/2011}
%
\usepackage{graphicx}
%
\usepackage{svn-multi}%
\svnid{$Id: d3-requirements-specification.tex 2884 2012-02-01 18:29:26Z tws $}%

\usepackage{rotating}
\usepackage{url}%

%Use cases
\newcommand\AcceptNomination{accept nomination}%
\newcommand\CreateManifesto{create manifesto}%
\newcommand\WithdrawCandidature{withdraw candidature}%

\newcommand\CastVote{cast vote}%
\newcommand\ViewManifesto{view manifesto}%

\newcommand\NominateCandidate{nominate candidate}%

\newcommand\ScheduleElection{schedule election}%
\newcommand\EditElection{edit election}%

\newcommand\OpenNominations{open nominations}%
\newcommand\StartElection{start election}%
\newcommand\StopElection{stop election}%

\newcommand\CancelElection{cancel election}%
\newcommand\PublishResults{publish results}%

\newcommand\ViewElections{view elections}%
\newcommand\ViewElection{view election}
\newcommand\SelectElection{select election}%

\newcommand\ViewElectorate{view electorate}%

\newcommand\CreateElectorate{create electorate}
\newcommand\EditElectorate{edit electorate}
\newcommand\AppointElectionManager{appoint election manager}
\newcommand\CreateNewElectionType{create new election type}


%Actors
\newcommand\User{User}%
\newcommand\ElectionManager{ElectionManager}%
\newcommand\Voter{Voter}%
\newcommand\SystemAdministrator{SystemAdministrator}%
\newcommand\Nominee{Nominee}%
\newcommand\Candidate{Candidate}%
\newcommand\Timer{Timer}%

%Domain elements
\newcommand\Electorate{Electorate}%
\newcommand\Election{Election}%
\newcommand\ElectoralSystem{ElectoralSystem}%
\newcommand\ElectionType{ElectionType}%
\newcommand\ElectionRole{ElectionRole}%
\newcommand\Vote{Vote}%

%Statuses
\newcommand\Unelaborated{Unelaborated}%
\newcommand\Elaborated{Elaborated}%
\newcommand\NotImplemented{Not implemented}


\usepackage{usecasedescription}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\title{
  \vspace{-.625in}
  PSD 2011-12 Group Exercise 1 (D4) : \\ Requirements Specification
}

\author{Tim Storer and Jeremy Singer}

\date{
  {Revision \svnrev},
  {made \svnday/\svnmonth/\svnyear~ by \svnauthor}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\maketitle

\tableofcontents

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\section{Introduction}

The Computing Science Management Committee (CSMC) has proposed the
development of an electronic voting system to improve the management,
consistency and convenience of running elections within the school.
Consequently, a new computer based voting system system `DemosSOCS'
has been proposed.

The key features envisaged for the system are:

\begin{itemize}
\item creation of different types of elections and referenda,
  including the nomination of candidates;
\item registering of voters eligible for different elections;
\item casting votes; and
\item computing and publishing results of elections.
\end{itemize}

The overall work flow envisaged for an election is as follows.  An
\ElectionManager\ creates a new \Election by specifying an election
type, specifying a schedule for nomination of candidates and casting
of votes.

The election is opened to nominations at the scheduled time, or
manually by the \ElectionManager.  Any eligible \Voter\ in the
election may choose to nominate any {\em other} eligible \Voter\ to
stand as a candidate in the \Election.  Note that a \Voter\ cannot
nominate themselves and that the eligible candidates are restricted to
the \Electorate for the \Election.

The nominated \Voter\ is then also a \Nominee\ in the \Election\ and
is notified of this by the system.  All \Voter s can only be nominated
once per \Election. A \Nominee\ may choose to accept or decline the
nomination. If they accept, then they become a candidate in the
election.

Similar to nominations, the voting period is opened by the system at
the scheduled time, or manually be the \ElectionManager.  All eligible
\Voter s may cast votes in the election.  A \Voter\ may cast as many
votes as they wish in the election, only the last vote cast is
counted.

Once the voting period ends, the \ElectionManager\ can publish
the results of the election for review by any other user of the system.

Obviously, CSMC are keen to ensure that the new system is both usable
and secure. The requirements for the voting system are specified in
this document.

A domain model describing the data elements to be managed by the
system is provided in Section \ref{sec:domain}. Further details of the
use cases for the system are provided in Section \ref{sec:use-cases}.
Non-functional requirements are described in Section
\ref{sec:non-functional}.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newpage
\section{Domain Model and System Actors}
\label{sec:domain}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

The class diagram in Figure \ref{fig:domain} illustrates the
domain elements that need to be represented in the system.

\input{use-cases/domain}

The major domain elements for the system are:

\begin{itemize}
\item \Election\ which represents a single occurence of an election.
\item \ElectionType which maintains the configuration of election
  rules (including \ElectoralSystem\ from election to election.
\item \User\ and the aggregrate \Electorate, which maps which users
  are eligible to participate in which \Election s as \Candidate s and
  \Voter s.
\item \ElectionRole\ is used to record actual participation in an
  \Election\ by a \User as a \Voter, \Nominee, \Candidate or
  \ElectionManager.

\item \Vote\ represents actuals votes cast by \Voter s for \Candidate
  s.
\end{itemize}

A short summary of the actors is given below:

\begin{description}
\item[Voter] a user who is eligible to nominate candidates and cast a
  vote in an election.
\item[Nominee] a \Voter in an election who can accept nomations from
  other voters.
\item[Candidate] a \Voter who has accepted a nomination to be a
  candidate in an election.
\item[ElectionManager] a user who conducts administrative tasks for a
  subset of elections managed by the system.
\item[SystemAdministrator] a user responsible for appointing election
  managers, creating election {\em types} and managing electorates.
\end{description}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newpage

\section{Use Cases\label{sec:use-cases}}

This section describes the required functionality for the system.  In
summary, the use cases are (with priorities in brackets):

\begin{itemize}

\item Election management
  \begin{itemize}
  \item \ScheduleElection (\MustHave)
  \item \EditElection (\MustHave)
  \item \OpenNominations (\MustHave) 
  \item \StartElection (\MustHave)
  \item \StopElection (\MustHave)
  \item \PublishResults (\MustHave)
  \item \CancelElection (\WouldHave)
  \end{itemize}

\item Candidate management
  \begin{itemize}
  \item \NominateCandidate (\MustHave)
  \item \AcceptNomination (\MustHave)
  \item \CreateManifesto (\WouldHave)
  \item \WithdrawCandidature (\WouldHave) 
  \end{itemize}

\item Voting
  \begin{itemize}
  \item \CastVote (\MustHave)
  \item \ViewManifesto (\WouldHave)
  \end{itemize}

\item Common and utility
  \begin{itemize}
  \item \ViewElection (\MustHave)
  \item \ViewElections (\MustHave)
  \item \SelectElection (\MustHave)
  \item \ViewElectorate (\MustHave)
  \end{itemize}

\item System administration
  \begin{itemize}
  \item \CreateElectorate (\ShouldHave)
  \item \EditElection (\WouldHave)
  \item \AppointElectionManager (\CouldHave)
  \item \CreateNewElectionType (\WouldHave)
  \end{itemize}

\end{itemize}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newpage

\subsection{Election Management}

\begin{centering}
    \includegraphics{use-cases/ElectionManagement-1}

\end{centering}

\input{use-cases/ElectionManagement/ScheduleElection}%

\input{use-cases/ElectionManagement/EditElection}%

\input{use-cases/ElectionManagement/OpenNominations}%

\input{use-cases/ElectionManagement/StartElection}%

\input{use-cases/ElectionManagement/StopElection}%

\input{use-cases/ElectionManagement/PublishResults}%

\input{use-cases/ElectionManagement/CancelElection}%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newpage

\subsection{Candidate Management}

\begin{centering}
  \includegraphics{use-cases/CandidateManagement-1}

\end{centering}

\input{use-cases/CandidateManagement/NominateCandidate}%

\input{use-cases/CandidateManagement/AcceptNomination}%

\input{use-cases/CandidateManagement/CreateManifesto}%

\input{use-cases/CandidateManagement/WithdrawCandidature}%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newpage

\subsection{Voting}

\begin{centering}
  \includegraphics{use-cases/Voting-1}  

\end{centering}

\input{use-cases/Voting/CastVote}%

\input{use-cases/Voting/ViewManifesto}%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newpage

\subsection{Common and Utility}

\begin{centering}
  \includegraphics{use-cases/Common-1}  

\end{centering}

\input{use-cases/Common/ViewElections}%

\input{use-cases/Common/ViewElection}%

\input{use-cases/Common/SelectElection}%

\input{use-cases/Common/ViewElectorate}%

\newpage

\subsection{System Administration}

\input{use-cases/SystemAdministration/CreateElectorate}%

\input{use-cases/SystemAdministration/EditElectorate}%

\input{use-cases/SystemAdministration/AppointElectionManager}%

\input{use-cases/SystemAdministration/CreateNewElectionType}%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newpage

\section{Non-Functional Requirements}
\label{sec:non-functional}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{list}{}{}
\item The system shall support (at minimum) elections run under simple
  plurality (first past the post) rules.
\item The system shall support elections for (at minimum) a single
  electorate consisting of the level 3 {\em or} level 5 cohort.
\item The system shall support (at minimum) elections for class
  representatives from a single electorate under the simple plurality
  electoral system rules.
\item The system shall be sufficiently secure to withstand attack by
  an adversary with the same resources as a PSD project team.
\item The system shall have sufficient capacity to support five
  concurrent elections.
\item The system shall be capable of collecting at least 100,000 votes
  per election.
\end{list}

\section{Design Issues}

There are several issues resulting from the development of the domain
model that need to be addressed by design activities.

\begin{enumerate}
\item It has transpired that the University's MyCampus student
  life--cycle management system will not be ready to provide
  authentication information on users (based on their GUID and
  password) and their different groups to the election system.  The
  system must be designed to readily integrate this feature in the
  future {\em and} provide a demonstration of the features of the
  sysetm without it for the time being.
\item It is still unclear what further electoral systems may need to
  be supported in the near future.
\end{enumerate}

\end{document}